<?php if ($this->pageCount): ?>
    <div class="pagination">
    	<ul>
    		<li <?php echo!isset($this->previous) ? 'class="disabled"' : ''; ?>>
        		<a href="<?php echo $this->url($this->route, array('page' => $this->first), array(), true); ?>">&laquo;</a>
        	</li>
    		<li <?php echo!isset($this->previous) ? 'class="disabled"' : ''; ?>>
    		  <a href="<?php echo $this->url($this->route, array('page' => $this->previous), array(), true); ?>">&lsaquo;</a>
    		</li>
    
    		<!-- Numbered page links -->
            <?php foreach ($this->pagesInRange as $page): ?>
                <li
        			<?php echo $page == $this->current ? 'class="active"' : ''; ?>>
        			<a href="<?php echo $this->url($this->route, array('page' => $page), array(), true); ?>"><?php echo $page; ?></a>
        		</li>
            <?php endforeach; ?>
    
            <!-- Next page link -->
    		<li <?php echo!isset($this->next) ? 'class="disabled"' : ''; ?>>
    		  <a href="<?php echo $this->url($this->route, array('page' => $this->next), array(), true); ?>">&rsaquo;</a>
    		</li>
    		
    		<!-- Last page link -->
    		<li <?php echo!isset($this->next) ? 'class="disabled"' : ''; ?>>
    		  <a href="<?php echo $this->url($this->route, array( 'page' => $this->last), array(), true); ?>">&raquo;</a>
    		</li>
    	</ul>
    </div>
<?php endif; ?>